package com.graduation.rescuematerial.service;


import com.graduation.rescuematerial.vo.*;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public interface UserService {
    /**
     * 根据cookie获取用户
     * @param ticket
     * @param request
     * @param response
     * @return
     */
    UserVo getUserByCookie(String ticket, HttpServletRequest request, HttpServletResponse response);

    /**
     * 登录
     * @param loginVo
     * @param request
     * @param response
     * @return
     */
    RespBean doLogin(LoginVo loginVo, HttpServletRequest request, HttpServletResponse response);

    /**
     * 普通用户注册
     * @param registerVo
     * @return
     */
    RespBean register(RegisterVo registerVo);

    /**
     * 发送邮件验证码
     * @param email
     * @return
     */
    RespBean sendEmail(String email,String message);

    /**
     * 测试一下接口
     * @return
     */
    RespBean test();

    /**
     * 系统管理员注册系统管理员
     * @param userBaseVo
     * @return
     */
    RespBean registerSysAdmin(UserBaseVo userBaseVo);

    /**
     * 系统管理员注册用户
     * @param registerUserVo
     * @return
     */
    RespBean registerUser(RegisterUserVo registerUserVo);


    //修改个人信息
    RespBean updateUserInfo(UpdatePersonalInfo updatePersonalInfo);
    //修改部门用户信息
    RespBean updateUserInfo(UpdatePersonalInfo updatePersonalInfo, String companyName);

    //获取部门普通用户的用户列表
    RespBean getOrgCommonUserList(String action, String companyName);

    //系统管理员查询所有用户的联合查询
    RespBean sysUnionQuery(UnionQueryUserVo unionQueryUserVo);

    RespBean cancelUser(Long phone, Boolean status, String companyName);

    //获取部门用户列表
    RespBean getListByCompanyName(String companyName,String action);

}
